#!/bin/sh

#py_flag="python_3.7.4"
py_flag="pypy_7.2.0"
#py_flag="pypy6.0_ddcCommon"
#py_flag="python"
#py_flag="pypy"

proc_name="DtsServiceApi"

deploy_dir="/home/IOTPlatform/"
system_log_dir="/var/log/"
deploy_dir="${deploy_dir%/}"
system_log_dir="${system_log_dir%/}"
proc_start_log="/root/vcom/proc_start_all.log"
time_str=`date  +"%Y-%m-%d %H:%M:%S"`


# proc-log-stop
echo "${time_str}--${proc_name}--stop" >>${proc_start_log}

flag_add=app
py_flag=pypy

kill -9 `ps -ef|grep "${proc_name}" |egrep -v "grep|tail"  |grep "${flag_add}" |grep  "/${proc_name}/${flag_add}" |awk -F" " '{print $2}'  `